package com.corex.webservice;

import android.content.Context;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;

import com.classapp.login.LoginBeanMobile;
import com.corex.responsebean.LoginResponse;
import com.corex.staticclasses.StaticData;
import com.corex.utils.Constants;

public class LoginService extends BaseService{
	public LoginService() {
		
	}
	
	private LoginResponse executeRequest(){
		LoginResponse response = null;
		try {
			response = (LoginResponse) execute();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return response;
	}
	
	public LoginResponse executeLogin(String userName,String pass,String userId,String deviceId) {
		LoginService loginService = new LoginService();
        LoginBeanMobile loginBeanMobile = new LoginBeanMobile();

		loginBeanMobile.setUsername(userName);
		loginBeanMobile.setPassword(pass);
		loginBeanMobile.setUserid(userId);
        loginBeanMobile.setDeviceId(deviceId);
		//setLoginBeanMobile(loginBeanMobile);
		StaticData.loginBeanMobile = loginBeanMobile;
		
		setUrl(Constants.LOGIN_URL);
		setResponceClass(LoginResponse.class);
		
		LoginResponse response = executeRequest();
		return response;
	}
}
 